#include "Input.h"

hxe::Input::Input()
{
    GLFWwindow* window = Engine::getInstance()->getWindow();
    double xpos, ypos;
    glfwGetCursorPos(window, &xpos, &ypos);
    mousePosition.x = (float)xpos;
    mousePosition.y = (float)ypos;
}

Vector2 hxe::Input::getMousePosition() const
{
    return mousePosition;
}

bool hxe::Input::getKeyDown(int keyCode) const
{
    GLFWwindow* window = Engine::getInstance()->getWindow();
    return glfwGetKey(window, keyCode) == GLFW_PRESS;
}

